<div class="search" >
    <input type="text" name="keyword" class="input-m" value="{$keyword}" id="keyword" placeholder="请输入产品ID或者名称">
    <select name="status" id="status">
      <option value="全部" <if condition="$status eq '全部'">selected</if>>全部</option>
      <option value="1" <if condition="$status eq '1'">selected</if>>已启用</option>
      <option value="0" <if condition="$status eq '0'">selected</if>>已停用</option>
    </select>
    <input type="button" class="button-green" value="查  询" onClick="Request()">
</div>
<div class="operate2">
  <ul>
    <li onclick="window.location='{:U(MODULE_NAME.'/Product/localtraveladd')}'"><span class="icon-add01"></span>添加当地游产品</li>
  </ul>
  <div class="clear"></div>
</div>

<table class="list">
		<thead>
  		<tr>
        <th>产品ID</th>
        <th>图片</th>
        <th>标题</th>
        <th>主站分类</th>
        <th>发布时间</th>
        <th>状态</th>
        <th>操作</th>
      </tr>
		</thead>
         <tbody>
		<foreach name='list' item='v'>
        <tr>
           <td>{$v.id}</td>
            <td>
              <img src="<if condition='$v.litPic eq null'>__PUBLIC__/image/product.jpg<else/>__URL__{$v.litPic}</if>" width="220" />
           </td>
           <td class="title" >{$v.title}<if condition="$v.recommend eq 1"><span style="color:#FF0000;">[今日推荐]</span></if></td>
           <td>{$v.categoryName}</td>
           <td>{$v.dateLine|date='Y-m-d H:i:s',###}</td>
           <td><if condition="$v.status eq 1"><font class="font-green">启用</font><else /><font class="red">停用</font></if></td>
           <td>
               <if condition="$v.recommend eq 1">
                <a href="javascript:;" onclick="toConfirm('{:U(MODULE_NAME.'/Product/localTravelRecommendSet',array('id' => $v['id'],'type'=>'0'),'')}', '确实要取消推荐吗？')">取消推荐</a>&nbsp;&nbsp;
               <else />
               <a href="javascript:;" onclick="toConfirm('{:U(MODULE_NAME.'/Product/localTravelRecommendSet',array('id' => $v['id'],'type'=>'1'),'')}', '确实要推荐吗？')">今日推荐</a>&nbsp;&nbsp;
               </if>
               <if condition="$v.status eq 1">
                <a href="javascript:;" onclick="toConfirm('{:U(MODULE_NAME.'/Product/localTravelStatusSet',array('id' => $v['id'],'status'=>'0'),'')}', '确实要停用此产品吗？')">停用</a>&nbsp;&nbsp;
               <else />
               <a href="javascript:;" onclick="toConfirm('{:U(MODULE_NAME.'/Product/localTravelStatusSet',array('id' => $v['id'],'status'=>'1'),'')}', '确实要启用此产品吗？')">启用</a>&nbsp;&nbsp;
               </if>
               <!-- <a href="__URL__/Product/details/id/{$v['id']}"target="_blank">查看</a>&nbsp;&nbsp; -->
               <a href="{:U(MODULE_NAME.'/Product/localtraveledit',array('id' => $v['id']), '')}">编辑</a>&nbsp;&nbsp;
               <a href="javascript:;" onclick="toConfirm('{:U(MODULE_NAME.'/Product/localtraveldel',array('id' => $v['id']), '')}', '确实要删除吗？')">删除</a>&nbsp;&nbsp;
           </td>
       </tr>
      </foreach>
 </tbody>
</table>
<div class="page" style="clear: both;">{$page}</div>
<script type="text/javascript">
  /**
   * [Request description]
   */
  function Request()
  {
    var url = '';
        url+= '?';
        url+= 'keyword='+$('#keyword').val();
        url+= '&status='+$('#status').val();
    window.location.href = '/Product/localtravel.html'+url;
  }
</script>